package com.example.demo.service.impl;

import com.example.demo.dao.PropagandainfoDao;
import com.example.demo.entity.Propagandainfo;
import com.example.demo.service.PropagandainfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class PropagandainfoServiceImpl implements PropagandainfoService {
    @Resource
    PropagandainfoDao propagandainfoDao;
    @Override
    public int insertproinfo(Propagandainfo propagandainfo) {
        System.out.println(propagandainfo);
        return  propagandainfoDao.insertproinfo(propagandainfo);
    }

    @Override
    public List<Propagandainfo> selectAllproinfo() {
        {
            return propagandainfoDao.selectAllproinfo();
        }
    }
    @Override
    public Propagandainfo selectproinfo(int id){
        return propagandainfoDao.selectproinfo(id);
    }

    @Override
    public int updateproinfo(Propagandainfo propagandainfo) {
            System.out.println(propagandainfo);
            propagandainfoDao.updateproinfo(propagandainfo);
            return 1;
    }

    @Override
    public int deleteproinfo(int id) {
            propagandainfoDao.deleteproinfo(id);
            return 1;
    }
}
